//
//  ZLDetailFooterReusableView.m
//  TripTogether
//
//  Created by dllo on 15/12/24.
//  Copyright © 2015年 杨泓晔. All rights reserved.
//

#import "ZLDetailFooterReusableView.h"
#import "Masonry.h"

@interface ZLDetailFooterReusableView ()

@property (nonatomic, strong)UIButton *btn;

@end

@implementation ZLDetailFooterReusableView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.btn = [UIButton buttonWithType:(UIButtonTypeCustom)];
        [self.btn setTitle:@"全部热门地点" forState:(UIControlStateNormal)];
        [self.btn setTitleColor:[UIColor lightGrayColor] forState:(UIControlStateNormal)];
        [self addSubview:self.btn];
        
        [self.btn mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.left.equalTo(self.mas_left).offset(10);
            make.right.equalTo(self.mas_right).offset(-10);
            make.top.equalTo(self.mas_top);
            make.bottom.equalTo(self.mas_bottom).offset(-20);
        }];
        self.btn.layer.borderWidth = 1;
        self.btn.layer.cornerRadius = 15;
        [self.btn addTarget:self action:@selector(btnAction:) forControlEvents:(UIControlEventTouchUpInside)];
        
    }
    return self;
}

- (void)btnAction:(UIButton *)btn
{
    [self.detailFooterReusableViewDelegate toDestinationDetailIntroduce];
}

@end
